<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;


/**
 * Class Author
 *
 * @package App\Models
 * @property int $id
 * @property int $user_id 用户id
 * @property string $name 姓名
 * @property string $id_card 身份证号
 * @property string $mobile 手机号码
 * @property string $qq QQ
 * @property string $created_at
 * @property string $updated_at
 * @property string $sign_pic 手写签名图片
 */

class Student extends Model
{
    use SoftDeletes;
    
    protected $table = 'xyj_student';

    protected $primaryKey = 'user_id';
    
    protected $fillable = [
        'user_id',
        'name',
        'certificates_type',        //证件类型
        'id_card',
        'mobile',
        'qq',
        'email',
        'school_id',
        'dept_id',
        'speciality_id',
        'province_id',
        'city_id',
        'district_id',
        'school_year',
        'sign_pic',
        'ems',
        'alipay'
    ];

    
    public function school(){
        return $this->belongsTo('\App\Models\School', 'school_id');
    }

    public function user(){
        return $this->belongsTo('\App\Models\User' , 'user_id');
    }
    

}